#pragma once

#define LOG_CHANNEL_NONE		0x00000000
#define LOG_CHANNEL_0			0x00000001
#define LOG_CHANNEL_1			0x00000002
#define LOG_CHANNEL_2			0x00000004
#define LOG_CHANNEL_3			0x00000008
#define LOG_CHANNEL_4			0x00000010
#define LOG_CHANNEL_5			0x00000020
#define LOG_CHANNEL_6			0x00000040
#define LOG_CHANNEL_7			0x00000080
#define LOG_CHANNEL_ALL			0xFFFFFFFF

#define ERROR_CODE_NONE				0x00000000
#define ERROR_CODE_FILTER			0x7FFFFFFF
#define ERROR_CODE_FATAL			0x80000000
#define ERROR_CODE_NULL_POINTER		0x00000001
#define ERROR_CODE_ILLEGAL_PARAM	0x00000002
#define ERROR_CODE_STRUCT_ERROR		0x00000003
#define ERROR_CODE_EMPTY_STACK		0x00000004
#define ERROR_CODE_DATA_ERROR		0x00000005
#define ERROR_CODE_DIV_ZERO			0x00000006
#define ERROR_CODE_ILLEGAL_CALL		0x00000007
#define ERROR_CODE_POOL_OVERFLOW	0x00000008
#define ERROR_CODE_STACK_OVERFLOW	0x00000009
#define ERROR_CODE_HEAP_OVERFLOW	0x0000000A
#define ERROR_CODE_CFG_STRING_ERROR	0x0000000B

#include <stdio.h>

namespace EngineLib {

	class LogManagement
	{
	private:
		static unsigned int _channal;
		static FILE *_file;

	private:
		static void OpenFile(void);
		static void CloseFile(void);
		static void LogFile(char *msg);
		static void LogFile(unsigned int code);

	public:
		static void StartUp(void);
		static void ShutDown(void);

		static void switchChannel(unsigned int channal);

		static void Log(char *msg, unsigned int channal);
		static void Error(unsigned int code);
	};

}